package me.firstapp.common.module.shop;

import java.util.Date;

import me.firstapp.common.module.base.JsonBase;

public class JsonProductInManage extends JsonBase {

	private static final long serialVersionUID = -7360458970968811338L;

	// 与种类关联
	private Long categoryId;

	private String categoryName;

	// 列表图片
	private String listImage;

	// 小图片
	private String smallImage;

	// 其它图片，用逗号隔开
	private String images;

	// 商品名称
	private String name;

	// 商品简介
	private String summary;

	// 商品详情
	private String detail;

	// 配送方式
	private String deliver;

	// 运费
	private Double deliverFee = 0.00;

	// 是否上下架，0为下架，1为上架，默认为下架
	private Integer disable;

	// 浏览数
	private Long viewCounts = 0L;

	// 评论数
	private Long replyCounts = 0L;

	// 收藏数
	private Long collectCounts = 0L;

	// 排序
	private Integer sort;

	// 添加时间
	private Date addTime;

	// 更新时间
	private Date updatedAt;

	// ==========以下是冗余字段===================================================================
	private Long productSkuRelationId;
	// 属性名1
	private String skuName1;

	// 属性值1
	private String skuValue1;

	// 属性名2
	private String skuName2;

	// 属性值2
	private String skuValue2;

	// 库存
	private Integer stock;

	// 价格
	private Double price;

	public JsonProductInManage(JsonProduct prdt) {
		this.id = prdt.getId();
		this.categoryId = prdt.getCategory().getId();
		this.categoryName = prdt.getCategory().getName();
		this.listImage = prdt.getListImage();
		this.smallImage = prdt.getSmallImage();
		this.images = prdt.getImages();
		this.name = prdt.getName();
		this.summary = prdt.getSummary();
		this.detail = prdt.getDetail();
		this.deliver = prdt.getDeliver();
		this.deliverFee = prdt.getDeliverFee();
		this.disable = prdt.getDisable();
		this.viewCounts = prdt.getViewCounts();
		this.replyCounts = prdt.getReplyCounts();
		this.collectCounts = prdt.getCollectCounts();
		this.sort = prdt.getSort();
		this.addTime = prdt.getAddTime();
		this.updatedAt = prdt.getUpdatedAt();
		this.skuName1 = prdt.getSkuName1();
		this.skuValue1 = prdt.getSkuValue1();
		this.skuName2 = prdt.getSkuName2();
		this.skuValue2 = prdt.getSkuValue2();
		this.price = prdt.getPrice();
		this.stock = prdt.getStock();
		this.productSkuRelationId = prdt.getProductSkuRelationId();
	}

	public Long getProductSkuRelationId() {
		return productSkuRelationId;
	}

	public void setProductSkuRelationId(Long productSkuRelationId) {
		this.productSkuRelationId = productSkuRelationId;
	}

	public Long getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(Long categoryId) {
		this.categoryId = categoryId;
	}

	public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	public String getListImage() {
		return listImage;
	}

	public void setListImage(String listImage) {
		this.listImage = listImage;
	}

	public String getSmallImage() {
		return smallImage;
	}

	public void setSmallImage(String smallImage) {
		this.smallImage = smallImage;
	}

	public String getImages() {
		return images;
	}

	public void setImages(String images) {
		this.images = images;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public Integer getDisable() {
		return disable;
	}

	public void setDisable(Integer disable) {
		this.disable = disable;
	}

	public Long getViewCounts() {
		return viewCounts;
	}

	public void setViewCounts(Long viewCounts) {
		this.viewCounts = viewCounts;
	}

	public Long getReplyCounts() {
		return replyCounts;
	}

	public void setReplyCounts(Long replyCounts) {
		this.replyCounts = replyCounts;
	}

	public Long getCollectCounts() {
		return collectCounts;
	}

	public void setCollectCounts(Long collectCounts) {
		this.collectCounts = collectCounts;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public String getDeliver() {
		return deliver;
	}

	public void setDeliver(String deliver) {
		this.deliver = deliver;
	}

	public Double getDeliverFee() {
		return deliverFee;
	}

	public void setDeliverFee(Double deliverFee) {
		this.deliverFee = deliverFee;
	}

	public Date getAddTime() {
		return addTime;
	}

	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}

	public Date getUpdatedAt() {
		return updatedAt;
	}

	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}

	public String getSkuName1() {
		return skuName1;
	}

	public void setSkuName1(String skuName1) {
		this.skuName1 = skuName1;
	}

	public String getSkuValue1() {
		return skuValue1;
	}

	public void setSkuValue1(String skuValue1) {
		this.skuValue1 = skuValue1;
	}

	public String getSkuName2() {
		return skuName2;
	}

	public void setSkuName2(String skuName2) {
		this.skuName2 = skuName2;
	}

	public String getSkuValue2() {
		return skuValue2;
	}

	public void setSkuValue2(String skuValue2) {
		this.skuValue2 = skuValue2;
	}

	public Integer getStock() {
		return stock;
	}

	public void setStock(Integer stock) {
		this.stock = stock;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

}
